Component({
    properties: {
        index: {
            type: Number,
            observer: function (newVal, oldVal, changedPath) {
                let val = newVal < 10 ? '0' + newVal : newVal
                this.setData(
                    {
                        _index: val
                    }
                )

            }
        }

    },
    data: {
        monthList:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
        year: 0,
        month: '',
        _index:''

    },

    attached:function () {
        let date=new Date()
        let month= date.getMonth()
        let year=date.getFullYear()
        this.setData(
            {
                year,
                month:this.data.monthList[month]


            }


        )


    },
    methods: {}
})

